Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: target browsers that support css nesting #38

Closed
wants to merge 1 commit into from
Closed

chore: target browsers that support css nesting #38

wants to merge 1 commit into from

Conversation

gabrielpenteado
Copy link
Contributor

ISSUE #37

Changes

  • Creating and configuring the .browserslistrc file to include browsers that support CSS Nesting.
  • Testing CSS output in the specified browsers to confirm compatibility.

@alcpereira
Copy link
Owner

Thanks for your contribution.

I've thought about this issue and here are a few considerations:

  • Our main concern is CSS nesting at the moment, that could be targeted by a browserlist config like fully supports css-nesting using caniuse (see docs and online viewer)
  • Vite uses ESBuild and the build target is not directly compatible with browserlist, we could use a library like browserlist-to-esbuild
  • Currently we are using the browser from Puppeteer to generate the PDF, so the browserlist doesn't make a lot of sense for now
  • A simpler solution would be to use a CSS post-processor, Vite can use LightningCSS that has a support to transpile nested CSS

Once we start migrating to a fully client PDF Generator, removing Puppeteer from the equation, it will make sense to re-evaluate having a browserlist and be sure that all our feature are correctly supported.

Sorry for the change of thoughts, what do you think about implementing instead LightningCSS with Vite, we close the issue and we re-open it when we look at full client side PDF generation?

@gabrielpenteado
Copy link
Contributor Author

I agree, thank you for all the explanations. When we have a full client app, we can reconsider the topic.

@alcpereira
Copy link
Owner

Closing the PR as Vite is already covering this. We will come back to a potential browserlist once we develop the full client feature.

@alcpereira alcpereira closed this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants